
from .models import *

from xadmin import site as adminx_site
# Register your models here.

class UserAdmin(object):
    list_display = ['mobile', 'state', 'getui_clientid']
adminx_site.register(User, UserAdmin)


# class AdministrativeAreaAdmin(object):
#     list_display = ['id', 'nid', '__str__']
# adminx_site.register(AdministrativeArea, AdministrativeAreaAdmin)


class TunLevelAdmin(object):
    list_display = ['id', 'name', 'need_grow_coin']
    fields = ['name', 'icon_public_file_id', 'need_grow_coin']
adminx_site.register(TunLevel, TunLevelAdmin)


class UserTunLevelRightAdmin(object):
    list_display = ('user',
                    'tun_level',
                    'take_out_free_postage_times_1y',
                    'free_get_try_drink_count',
                    'free_offline_experience_times_1y',
                    'procedure_preferential_percent',
                    'repo_preferential_percent',
                    'first_publish_product_pre_buy_times_1y')
adminx_site.register(UserTunLevelRight, UserTunLevelRightAdmin)